package com.xjoyt.pay.commons;

import java.util.LinkedHashMap;
import java.util.Map;

import com.xjoyt.pay.vo.PayMethod;

public final class PayMethodUtils {

	private static Map<PayMethod, String> payMap = null;

	static {
		payMap = new LinkedHashMap<>();
		payMap.put(PayMethod.UNIONPAY_BARCODE, "银联条码");
		payMap.put(PayMethod.UNIONPAY_MOBILE_GATEWAY, "银联手机网关支付");
		payMap.put(PayMethod.UNIONPAY_MOBILE_QUICK, "银联手机快捷支付");
		payMap.put(PayMethod.UNIONPAY_SCAN, "银联扫码");
	}

	public static Map<PayMethod, String> getAllPayType() {
		return payMap;
	}

	public static String getName(PayMethod type) {
		if (type == null) {
			return null;
		}
		return payMap.containsKey(type) ? payMap.get(type) : null;
	}

}
